<%--
  Created by IntelliJ IDEA.
  User: HUAWEI
  Date: 2024/1/2
  Time: 20:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>在线用户</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
    <style>
        /* 设置a标签样式*/
        a {
            color: black; /* 设置字体为白色 */
        }

        a:hover {
            color: red;
            text-decoration: none; /* 去除下划线效果 */
        }
    </style>
</head>
<body>
<%@include file="header.jsp"%>

<div class="row" style="padding-top: 10px;padding-bottom: 10px">
    <div class="col-1"></div>
    <div class="col-4">
        <a href="../admin/index.jsp" type="button" class="btn btn-primary">
            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-house-door-fill" viewBox="0 0 16 16">
                <path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z"/>
            </svg>
            首页
        </a>
    </div>
    <div class="col-2"><h4>用户管理页面</h4></div>
    <div class="col-5"></div>
</div>

<div class="row">
    <div class="col-2"></div>
    <div class="col-10">
        <h4>在线用户数：${UserList.size()}</h4>
        <table class="table table-bordered col-10">
            <thead>
            <tr>
                <th scope="col">序号</th>
                <th scope="col">用户名</th>
                <th scope="col">密码</th>
                <th scope="col">电话号码</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${UserList}" var="user" varStatus="number">
                <tr>
                    <th scope="row">${number.index+1}</th>
                    <td>${user.userName}</td>
                    <td>${user.pwd}</td>
                    <td>${user.tel}</td>
                </tr>
            </c:forEach>

            </tbody>
        </table>
    </div>
    <div class="col-1"></div>
</div>


</body>
</html>


